package com.ynu.znkz.controller;


import com.ynu.znkz.commomutils.R;
import com.ynu.znkz.service.PaperResearchProblemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author lu
 * @since 2021-05-29
 */
@RestController
@RequestMapping("/znkz/paperResearchProblem")
public class PaperResearchProblemController {
    @Autowired
    PaperResearchProblemService problemService;
    //增加研究方法
    @PostMapping("/addPaperResearchProblem")
    public R savaPaperResearchProblem(String PaperResearchProblem){
        String result = problemService.savePaperResearchProblem(PaperResearchProblem);

        return R.ok().message("研究问题加入数据库成功").data("paperResearchProblemId",result);
    }
}

